<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Create Category</title>
<link rel="stylesheet" href="<c:url value="/resources/blueprint/screen.css" />" type="text/css" media="screen, projection">
	<link rel="stylesheet" href="<c:url value="/resources/blueprint/print.css" />" type="text/css" media="print">
	<!--[if lt IE 8]>
		<link rel="stylesheet" href="<c:url value="/resources/blueprint/ie.css" />" type="text/css" media="screen, projection">
	<![endif]-->
</head>
<body>
<div class="container">
	<%@include file="../common/header.jsp" %>
    <c:if test="${category.id == null}">
        <h2>Create Category</h2>
    </c:if>
    <c:if test="${product.id != null}">
        <h2>Update Category</h2>
    </c:if>
    
    <div class="span-12 last">	
		<form:form modelAttribute="category" action="save" method="post"  class="cleanform ">
		  	<fieldset>		
				<legend>Category information</legend>
				<p>
					<form:label	for="name" path="name" cssErrorClass="error">Category Name</form:label>
					<form:input path="name" /> <form:errors path="name" />			
				</p>
				<p>	
                    <input type="hidden" name="id" value="${category.id}" />
					<input type="submit" value="Save"/>
				</p>
			</fieldset>
		</form:form>
	</div>
	<%@include file="../common/footer.jsp" %>
</div>
</body>
</html>